package cn.igeek.edu.service.imp;

import cn.igeek.edu.mapper.UserMapper;
import cn.igeek.edu.model.User;
import cn.igeek.edu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImp implements UserService {
    //将dao层的实例注入到service中
    @Autowired
    private UserMapper userMapper;


    @Override
    public User findUserById(Integer id) {
        return userMapper.findById(id);
    }
}
